#!/usr/bin/make -f

BUILDDIR = build_dir

# secondly called by launchpad
build:
	mkdir $(BUILDDIR);
	cd $(BUILDDIR); cmake -DCMAKE_INSTALL_PREFIX=../debian/tmp/usr -DGSETTINGS_COMPILE=OFF -DICON_UPDATE=OFF -DUSE_GTK2=on ..
	make -C $(BUILDDIR)

# thirdly called by launchpad
binary: binary-indep binary-arch

binary-indep:
	# nothing to be done

binary-arch:
	cd $(BUILDDIR); cmake -P cmake_install.cmake
	mkdir debian/tmp/DEBIAN
	dpkg-gencontrol -pcronopete-gtk2
	dpkg --build debian/tmp ..

# firstly called by launchpad
clean:
	rm -f build
	rm -rf $(BUILDDIR)

.PHONY: binary binary-arch binary-indep clean
